import Vue from 'vue'
import VueRouter from 'vue-router'

import ViewHome from '../views/Home.vue'
import ViewLogin from '../views/Login.vue'
import ViewList from '../views/List.vue'
import ViewDetail from '../views/Detail.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: ViewHome
  },
  {
    path:'/home',
    name:'Home',
    component:ViewHome
  },
  {
    path:'/login',
    name:'Login',
    component:ViewLogin
  },
  {
    path:'/list/:listid',
    name:'List',
    component:ViewList
  },{
    path:'/detail/:tableid',
    name:'Detail',
    component:ViewDetail
  }
]

const router = new VueRouter({
  routes
})

export default router
